package jxtend.processor.eclipse.visitor.handler;


import java.util.List;

import org.eclipse.jdt.internal.compiler.ast.ASTNode;
import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
import org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration;
import org.eclipse.jdt.internal.compiler.ast.Expression;
import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
import org.eclipse.jdt.internal.compiler.ast.ImportReference;
import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
import org.eclipse.jdt.internal.compiler.ast.Statement;
import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
import org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
import org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment;

@SuppressWarnings("restriction")
public interface ASTNodeHandlerVisitorContext extends ASTNodeHandlerContext {
	void appendMethod(TypeDeclaration typeDeclaration, MethodDeclaration methodDeclaration);
	void appendField(TypeDeclaration typeDeclaration, FieldDeclaration fieldDeclaration);
	void prependStatement(AbstractMethodDeclaration abstractMethodDeclaration, Statement statement);

	void resolveExpression(Expression expression, BlockScope blockScope);
	void resolveVariableDeclaration(AbstractVariableDeclaration variableDeclaration, BlockScope blockScope);
	
	void recordProblemForNode(ProblemSeverity severity, ReferenceContext referenceContext,
			int startPosition, int endPosition, String message);

	LookupEnvironment getLookupEnvironment();

	void backupStatementBits(Statement statement);

	ImportReference addImport(char[][] tokens);

	void replaceNode(ASTNode newNode);
	void resolveExpression(Expression expression, ClassScope classScope);
	List<ASTNode> getParentNodes();
}
